- /* sxckspi.cpp by K.Tsuru */
- // function ID 5107 BRADIX
- /********************************************************
- pi by Klingenstierna's formura
- pi/4 = 8*arctan(1/10) - arctan(1/239) -4*arctan(1/515)
- *********************************************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
- SDecimal BKlingenstiernaPi(){
- SDecimal bpi, u;
-
- bpi = Batan2(1, 10);
- XsMult(bpi, 8, bpi);
- u = Batan2(1, 239);
- XXSub(bpi, u, bpi);
- u = Batan2(1, 515);
- XsMult(u, 4, u);
- XXSub(bpi, u, bpi);
- XsMult(bpi, 4, bpi);
- return bpi;
- }
- // function ID 3510 DRADIX
- SDouble KlingenstiernaPi(){
- return BKlingenstiernaPi().ConvToDec();
- }
sxckspi.cpp : last modifiled at 2016/09/04 14:21:44(658 bytes)
created at 2015/12/22 16:09:56
The creation time of this html file is 2017/10/27 15:45:59 (Fri Oct 27 15:45:59 2017).